using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace MT5Trade.VerifyFileCacheCompliance
{
    /// <summary>
    /// 简化的市场数据模型，用于验证
    /// </summary>
    public enum Interval
    {
        OneMinute,
        FiveMinutes,
        FifteenMinutes,
        ThirtyMinutes,
        OneHour,
        FourHours,
        Daily,
        Weekly,
        Monthly
    }

    public class MarketTick
    {
        public string Symbol { get; set; }
        public DateTime Time { get; set; }
        public decimal Open { get; set; }
        public decimal High { get; set; }
        public decimal Low { get; set; }
        public decimal Close { get; set; }
        public decimal AdjustedClose { get; set; }
        public long Volume { get; set; }
        public decimal Change => Close - Open;
        public decimal ChangePercent => Open != 0 ? (Change / Open) * 100 : 0;
        public decimal Volatility { get; set; }
    }

    public interface IMarketDataProvider
    {
        Task<List<MarketTick>> GetHistoricalDataAsync(
            string symbol,
            DateTime startDate,
            DateTime endDate,
            Interval interval);

        Task<MarketTick> GetLatestQuoteAsync(string symbol);
    }
}